﻿using QueryZJK.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QueryZJK.Models
{
    public class Regen_YY: Regen_Base
    {

        protected Regen_YY()
        {
        }

        static Regen_YY instance = null;
        public static Regen_YY Instance
        {
            get
            {
                return instance ?? (instance = new Regen_YY());
            }
        }

        public override string GetSelectStr(QueryParameters param)
        {
            //"SELECT {0} FROM {1} WHERE {2} "
            string fieldNames = "*";
            string whereSQL = string.Format(" bdcdjmh like '%{0}%' AND djkid like '%{1}%' AND qxdm = '{2}' ",
                                             param.zh,
                                             param.djkid,
                                             (int)param.qxdm
                                            );
            return string.Format(SELECT_TEMPLATE,
                fieldNames,
                DJLX.BDC_REGN_YY.ToString(),
                whereSQL
                );
        }
    }
}
